{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content {:config('adminClass.main')}">
    <div class="row">
        <div class="col-sm-12">
            {include file="public/tophead"}
            {include file="public/top" /}
            <div class="ibox-content">
                {include file="public/topsection"}
                <form class="form-horizontal" method="post">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">父级分类：</label>
                        <div class="col-sm-8">
                            <select class="form-control" name="tid">
                                <option value="0">顶级位置</option>
                                {php}
                                if(isset($name)){
                                $typeidname=$name['tid'];
                                }elseif(input('?typeid')){
                                $typeidname=input('typeid');
                                }else{
                                $typeidname='';
                                }
                                {/php}
                                {volist name='category' id='v'}
                                <option value="{$v.id}" {eq name="v.id" value="$typeidname" }selected{/eq}>{:str_repeat('┠&nbsp;&nbsp;', $v['level'])}{$v['title']}</option>
                                {/volist}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">分类名称：</label>
                        <div class="col-sm-8">
                            <input name="title" type="text" class="form-control" value="{present name="name"}{$name.title}{/present}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">图标：</label>
                        <div class="col-sm-8">
                            <div class="input-group">
                                <img src="{present name='name.icon'}{if condition='$name.icon'}__ROOT__{$name.icon}{else /}__IMG__add_img.png{/if}{else /}__IMG__add_img.png{/present}" id="imageimg" style="max-width: 100%;max-height: 600px">
                                <input name="icon" type="hidden"  id="image" class="form-control" value="{present name='name'}{$name.icon}{/present}">
                                <span class="input-group-btn">
                                        <button type="button" class="btn btn-primary" id="tubiao">上传</button>
                                    </span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">排序：</label>
                        <div class="col-sm-8">
                            <input name="des" type="text" class="form-control" value="{present name="name"}{$name.des}{else/}50{/present}">
                            <span class="help-block m-b-none">数字大越靠前</span>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}
{load href="__PLUGINS__iCheck/icheck.min.js"}
{load href="__PLUGINS__iCheck/custom.css"}
{include file="public/bottom" /}
